useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_22'

	if window('Protocol Buffer Editor'):
		select('File_Txt', commonBits.sampleDir() + 'DTAR020_tst1.bin')
		click('Edit1')
		select_menu('View>>Sorted Field Tree')
		select('fields_JTbl', 'Store_No', 'Field,0')
		select('fields_JTbl', 'Dept_No', 'Field,1')
		select('fields_JTbl', 'cell:Field,1(Dept_No)')
		select('fieldSummary_JTbl', 'cell:Function,4()')
		select('fields_JTbl', 'cell:Field,1(Dept_No)')
		select('fieldSummary_JTbl', 'Sum', 'Function,4')
		select('fieldSummary_JTbl', 'Sum', 'Function,5')
		select('fieldSummary_JTbl', 'Minimum', 'Function,1')
		select('fieldSummary_JTbl', 'Minimum', 'Function,3')
		select('fieldSummary_JTbl', 'cell:Function,3(Minimum)')
		click('Build Tree')
		select('LineTree.FileDisplay_JTbl', 'cell:DATE,9(40118)')
		assert_p('LineTree.FileDisplay_JTbl', 'Content', '[[, , , 20, , 170, 2, 9880], [, , , 20, , 170, 1, 4870], [, , 63604808, 20, 40118, 170, 1, 4870], [, , , 20, , 280, 1, 5010], [, , 69684558, 20, 40118, 280, 1, 19000], [, , 69684558, 20, 40118, 280, -1, -19000], [, , 69694158, 20, 40118, 280, 1, 5010], [, , , 20, , 685, 0, 0], [, , 62684671, 20, 40118, 685, 1, 69990], [, , 62684671, 20, 40118, 685, -1, -69990], [, , , 59, , 335, 5, 35910], [, , , 59, , 335, 1, 12990], [, , 61664713, 59, 40118, 335, 1, 17990], [, , 61664713, 59, 40118, 335, -1, -17990], [, , 61684613, 59, 40118, 335, 1, 12990], [, , , 59, , 410, 1, 8990], [, , 68634752, 59, 40118, 410, 1, 8990], [, , , 59, , 620, 2, 7980], [, , 60694698, 59, 40118, 620, 1, 3990], [, , 60664659, 59, 40118, 620, 1, 3990], [, , , 59, , 878, 1, 5950], [, , 60614487, 59, 40118, 878, 1, 5950], [, , , 166, , 170, 4, 42560], [, , , 166, , 60, 1, 5080], [, , 68654655, 166, 40118, 60, 1, 5080], [, , , 166, , 80, 2, 31490], [, , 69624033, 166, 40118, 80, 1, 18190], [, , 60604100, 166, 40118, 80, 1, 13300], [, , , 166, , 170, 1, 5990], [, , 68674560, 166, 40118, 170, 1, 5990]]')
		click('Export')
		select('TabbedPane', 'Fixed')
		select('names on first line_Chk', 'true')
		select('Edit Output File_Chk', 'true')
		select('Keep screen open_Chk', 'true')
		click('Save File')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[Level_1, Level_2, Level_3, Level_4, Keycode_no, Store_No, DATE, Dept_No, Qty_Sold, Sale_Price], [File, , , , , 166, , 170, 11, 88350], [File, 20, , , , 20, , 170, 2, 9880], [File, 20, 170, , , 20, , 170, 1, 4870], [File, 20, 170, , 63604808, 20, 40118, 170, 1, 4870], [File, 20, 280, , , 20, , 280, 1, 5010], [File, 20, 280, , 69684558, 20, 40118, 280, 1, 19000], [File, 20, 280, , 69684558, 20, 40118, 280, -1, -19000], [File, 20, 280, , 69694158, 20, 40118, 280, 1, 5010], [File, 20, 685, , , 20, , 685, 0, 0], [File, 20, 685, , 62684671, 20, 40118, 685, 1, 69990], [File, 20, 685, , 62684671, 20, 40118, 685, -1, -69990], [File, 59, , , , 59, , 335, 5, 35910], [File, 59, 335, , , 59, , 335, 1, 12990], [File, 59, 335, , 61664713, 59, 40118, 335, 1, 17990], [File, 59, 335, , 61664713, 59, 40118, 335, -1, -17990], [File, 59, 335, , 61684613, 59, 40118, 335, 1, 12990], [File, 59, 410, , , 59, , 410, 1, 8990], [File, 59, 410, , 68634752, 59, 40118, 410, 1, 8990], [File, 59, 620, , , 59, , 620, 2, 7980], [File, 59, 620, , 60694698, 59, 40118, 620, 1, 3990], [File, 59, 620, , 60664659, 59, 40118, 620, 1, 3990], [File, 59, 878, , , 59, , 878, 1, 5950], [File, 59, 878, , 60614487, 59, 40118, 878, 1, 5950], [File, 166, , , , 166, , 170, 4, 42560], [File, 166, 60, , , 166, , 60, 1, 5080], [File, 166, 60, , 68654655, 166, 40118, 60, 1, 5080], [File, 166, 80, , , 166, , 80, 2, 31490], [File, 166, 80, , 69624033, 166, 40118, 80, 1, 18190], [File, 166, 80, , 60604100, 166, 40118, 80, 1, 13300], [File, 166, 170, , , 166, , 170, 1, 5990], [File, 166, 170, , 68674560, 166, 40118, 170, 1, 5990]]')
		select('LineList.Layouts_Txt', 'Full Line')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[Level_1Level_2Level_3Level_4Keycode_noStore_NoDATE Dept_NoQty_SoldSale_Price], [File                                  166          170    11      88350     ], [File   20                             20           170    2       9880      ], [File   20     170                     20           170    1       4870      ], [File   20     170           63604808  20      40118170    1       4870      ], [File   20     280                     20           280    1       5010      ], [File   20     280           69684558  20      40118280    1       19000     ], [File   20     280           69684558  20      40118280    -1      -19000    ], [File   20     280           69694158  20      40118280    1       5010      ], [File   20     685                     20           685    0       0         ], [File   20     685           62684671  20      40118685    1       69990     ], [File   20     685           62684671  20      40118685    -1      -69990    ], [File   59                             59           335    5       35910     ], [File   59     335                     59           335    1       12990     ], [File   59     335           61664713  59      40118335    1       17990     ], [File   59     335           61664713  59      40118335    -1      -17990    ], [File   59     335           61684613  59      40118335    1       12990     ], [File   59     410                     59           410    1       8990      ], [File   59     410           68634752  59      40118410    1       8990      ], [File   59     620                     59           620    2       7980      ], [File   59     620           60694698  59      40118620    1       3990      ], [File   59     620           60664659  59      40118620    1       3990      ], [File   59     878                     59           878    1       5950      ], [File   59     878           60614487  59      40118878    1       5950      ], [File   166                            166          170    4       42560     ], [File   166    60                      166          60     1       5080      ], [File   166    60            68654655  166     4011860     1       5080      ], [File   166    80                      166          80     2       31490     ], [File   166    80            69624033  166     4011880     1       18190     ], [File   166    80            60604100  166     4011880     1       13300     ], [File   166    170                     166          170    1       5990      ], [File   166    170           68674560  166     40118170    1       5990      ]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('names on first line_Chk', 'false')
		click('Save File')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File, , , , , 166, , 170, 11, 88350], [File, 20, , , , 20, , 170, 2, 9880], [File, 20, 170, , , 20, , 170, 1, 4870], [File, 20, 170, , 63604808, 20, 40118, 170, 1, 4870], [File, 20, 280, , , 20, , 280, 1, 5010], [File, 20, 280, , 69684558, 20, 40118, 280, 1, 19000], [File, 20, 280, , 69684558, 20, 40118, 280, -1, -19000], [File, 20, 280, , 69694158, 20, 40118, 280, 1, 5010], [File, 20, 685, , , 20, , 685, 0, 0], [File, 20, 685, , 62684671, 20, 40118, 685, 1, 69990], [File, 20, 685, , 62684671, 20, 40118, 685, -1, -69990], [File, 59, , , , 59, , 335, 5, 35910], [File, 59, 335, , , 59, , 335, 1, 12990], [File, 59, 335, , 61664713, 59, 40118, 335, 1, 17990], [File, 59, 335, , 61664713, 59, 40118, 335, -1, -17990], [File, 59, 335, , 61684613, 59, 40118, 335, 1, 12990], [File, 59, 410, , , 59, , 410, 1, 8990], [File, 59, 410, , 68634752, 59, 40118, 410, 1, 8990], [File, 59, 620, , , 59, , 620, 2, 7980], [File, 59, 620, , 60694698, 59, 40118, 620, 1, 3990], [File, 59, 620, , 60664659, 59, 40118, 620, 1, 3990], [File, 59, 878, , , 59, , 878, 1, 5950], [File, 59, 878, , 60614487, 59, 40118, 878, 1, 5950], [File, 166, , , , 166, , 170, 4, 42560], [File, 166, 60, , , 166, , 60, 1, 5080], [File, 166, 60, , 68654655, 166, 40118, 60, 1, 5080], [File, 166, 80, , , 166, , 80, 2, 31490], [File, 166, 80, , 69624033, 166, 40118, 80, 1, 18190], [File, 166, 80, , 60604100, 166, 40118, 80, 1, 13300], [File, 166, 170, , , 166, , 170, 1, 5990], [File, 166, 170, , 68674560, 166, 40118, 170, 1, 5990]]')
		select('LineList.Layouts_Txt', 'Full Line')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File                    166          170    11      88350     ], [File20                  20           170    2       9880      ], [File20 170              20           170    1       4870      ], [File20 170    63604808  20      40118170    1       4870      ], [File20 280              20           280    1       5010      ], [File20 280    69684558  20      40118280    1       19000     ], [File20 280    69684558  20      40118280    -1      -19000    ], [File20 280    69694158  20      40118280    1       5010      ], [File20 685              20           685    0       0         ], [File20 685    62684671  20      40118685    1       69990     ], [File20 685    62684671  20      40118685    -1      -69990    ], [File59                  59           335    5       35910     ], [File59 335              59           335    1       12990     ], [File59 335    61664713  59      40118335    1       17990     ], [File59 335    61664713  59      40118335    -1      -17990    ], [File59 335    61684613  59      40118335    1       12990     ], [File59 410              59           410    1       8990      ], [File59 410    68634752  59      40118410    1       8990      ], [File59 620              59           620    2       7980      ], [File59 620    60694698  59      40118620    1       3990      ], [File59 620    60664659  59      40118620    1       3990      ], [File59 878              59           878    1       5950      ], [File59 878    60614487  59      40118878    1       5950      ], [File166                 166          170    4       42560     ], [File16660               166          60     1       5080      ], [File16660     68654655  166     4011860     1       5080      ], [File16680               166          80     2       31490     ], [File16680     69624033  166     4011880     1       18190     ], [File16680     60604100  166     4011880     1       13300     ], [File166170              166          170    1       5990      ], [File166170    68674560  166     40118170    1       5990      ]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('FixedColNames_JTbl', 'cell:Include,2(true)')
		select('FixedColNames_JTbl', 'cell:Include,4(true)')
		click('Save File')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File, , , , , 166, 170, 88350], [File, 20, , , , 20, 170, 9880], [File, 20, 170, , , 20, 170, 4870], [File, 20, 170, , 63604808, 20, 170, 4870], [File, 20, 280, , , 20, 280, 5010], [File, 20, 280, , 69684558, 20, 280, 19000], [File, 20, 280, , 69684558, 20, 280, -19000], [File, 20, 280, , 69694158, 20, 280, 5010], [File, 20, 685, , , 20, 685, 0], [File, 20, 685, , 62684671, 20, 685, 69990], [File, 20, 685, , 62684671, 20, 685, -69990], [File, 59, , , , 59, 335, 35910], [File, 59, 335, , , 59, 335, 12990], [File, 59, 335, , 61664713, 59, 335, 17990], [File, 59, 335, , 61664713, 59, 335, -17990], [File, 59, 335, , 61684613, 59, 335, 12990], [File, 59, 410, , , 59, 410, 8990], [File, 59, 410, , 68634752, 59, 410, 8990], [File, 59, 620, , , 59, 620, 7980], [File, 59, 620, , 60694698, 59, 620, 3990], [File, 59, 620, , 60664659, 59, 620, 3990], [File, 59, 878, , , 59, 878, 5950], [File, 59, 878, , 60614487, 59, 878, 5950], [File, 166, , , , 166, 170, 42560], [File, 166, 60, , , 166, 60, 5080], [File, 166, 60, , 68654655, 166, 60, 5080], [File, 166, 80, , , 166, 80, 31490], [File, 166, 80, , 69624033, 166, 80, 18190], [File, 166, 80, , 60604100, 166, 80, 13300], [File, 166, 170, , , 166, 170, 5990], [File, 166, 170, , 68674560, 166, 170, 5990]]')
		select('LineList.Layouts_Txt', 'Full Line')
		assert_p('LineList.FileDisplay_JTbl', 'Content', '[[File                    166     170    88350     ], [File20                  20      170    9880      ], [File20 170              20      170    4870      ], [File20 170    63604808  20      170    4870      ], [File20 280              20      280    5010      ], [File20 280    69684558  20      280    19000     ], [File20 280    69684558  20      280    -19000    ], [File20 280    69694158  20      280    5010      ], [File20 685              20      685    0         ], [File20 685    62684671  20      685    69990     ], [File20 685    62684671  20      685    -69990    ], [File59                  59      335    35910     ], [File59 335              59      335    12990     ], [File59 335    61664713  59      335    17990     ], [File59 335    61664713  59      335    -17990    ], [File59 335    61684613  59      335    12990     ], [File59 410              59      410    8990      ], [File59 410    68634752  59      410    8990      ], [File59 620              59      620    7980      ], [File59 620    60694698  59      620    3990      ], [File59 620    60664659  59      620    3990      ], [File59 878              59      878    5950      ], [File59 878    60614487  59      878    5950      ], [File166                 166     170    42560     ], [File16660               166     60     5080      ], [File16660     68654655  166     60     5080      ], [File16680               166     80     31490     ], [File16680     69624033  166     80     18190     ], [File16680     60604100  166     80     13300     ], [File166170              166     170    5990      ], [File166170    68674560  166     170    5990      ]]')
	close()
